<%@ page contentType="text/html;charset=UTF-8" %>
<%@ include file="/WEB-INF/views/include/taglib.jsp"%>
<html>
<head>
	<title>学校管理</title>
	<meta name="decorator" content="default"/>
	<script type="text/javascript">
		$(document).ready(function() {
			
		});
		function page(n,s){
			$("#pageNo").val(n);
			$("#pageSize").val(s);
			$("#searchForm").submit();
        	return false;
        }
	</script>
</head>
<body>
	<ul class="nav nav-tabs">
		<li class="active"><a href="${ctx}/qhq/school/">学校列表</a></li>
		<shiro:hasPermission name="qhq:school:edit"><li><a href="${ctx}/qhq/school/form">学校添加</a></li></shiro:hasPermission>
	</ul>
	<form:form id="searchForm" modelAttribute="school" action="${ctx}/qhq/school/" method="post" class="breadcrumb form-search">
		<input id="pageNo" name="pageNo" type="hidden" value="${page.pageNo}"/>
		<input id="pageSize" name="pageSize" type="hidden" value="${page.pageSize}"/>
		<ul class="ul-form">
			<li><label>学校名称：</label>
				<form:input path="name" htmlEscape="false" maxlength="100" class="input-medium"/>
			</li>
			<li><label>院校类型：</label>
				<form:select path="collegeType" class="input-medium">
					<form:option value="" label=""/>
					<form:options items="${fns:getDictList('college_type')}" itemLabel="label" itemValue="value" htmlEscape="false"/>
				</form:select>
			</li>
			<li><label>所在省份：</label>
				<form:select path="region" class="input-medium">
					<form:option value="" label=""/>
					<form:options items="${fns:getRegionList('2')}" itemLabel="name" itemValue="id" htmlEscape="false"/>
				</form:select>
			</li>
			<li><label>办学层次：</label>
				<form:select path="schoolLevel" class="input-medium">
					<form:option value="" label=""/>
					<form:options items="${fns:getDictList('school_level')}" itemLabel="label" itemValue="value" htmlEscape="false"/>
				</form:select>
			</li>
			<li><label>办学性质：</label>
				<form:select path="schoolProperty" class="input-medium">
					<form:option value="" label=""/>
					<form:options items="${fns:getDictList('school_property')}" itemLabel="label" itemValue="value" htmlEscape="false"/>
				</form:select>
			</li>
			<li><label>是否211：</label>
				<form:select path="sftwo" class="input-medium">
					<form:option value="" label=""/>
					<form:options items="${fns:getDictList('yes_no')}" itemLabel="label" itemValue="value" htmlEscape="false"/>
				</form:select>
			</li>
			<li><label>是否985：</label>
				<form:select path="sfnine" class="input-medium">
					<form:option value="" label=""/>
					<form:options items="${fns:getDictList('yes_no')}" itemLabel="label" itemValue="value" htmlEscape="false"/>
				</form:select>
			</li>
			<li class="btns"><input id="btnSubmit" class="btn btn-primary" type="submit" value="查询"/></li>
			<li class="clearfix"></li>
		</ul>
	</form:form>
	<sys:message content="${message}"/>
	<table id="contentTable" class="table table-striped table-bordered table-condensed">
		<thead>
			<tr>
				<th>学校名称</th>
				<th>院校类型</th>
				<th>所在省份</th>
				<th>办学层次</th>
				<th>办学性质</th>
				<th>院校隶属</th>
				<th>学校地址</th>
				<th>学校网站</th>
				<th>学校图片</th>
				<th>招生章程</th>
				<th>联系电话</th>
				<th>学校图标</th>
				<th>招生代码</th>
				<th>是否211</th>
				<th>是否985</th>
				<th>更新时间</th>
				<th>备注</th>
				<shiro:hasPermission name="qhq:school:edit"><th>操作</th></shiro:hasPermission>
			</tr>
		</thead>
		<tbody>
		<c:forEach items="${page.list}" var="school">
			<tr>
				<td><a href="${ctx}/qhq/school/form?id=${school.id}">
					${school.name}
				</a></td>
				<td>
					${fns:getDictLabel(school.collegeType, 'college_type', '')}
				</td>
				<td>
					${fns:getRegionById(school.region).name}
					
				</td>
				<td>
					${fns:getDictLabel(school.schoolLevel, 'school_level', '')}
				</td>
				<td>
					${fns:getDictLabel(school.schoolProperty, 'school_property', '')}
				</td>
				<td>
					${fns:getDictLabel(school.schoolUpdept, 'school_updept', '')}
				</td>
				<td>
					${school.address}
				</td>
				<td>
					${school.website}
				</td>
				<td>
					${school.image}
				</td>
				<td>
					${school.recruit}
				</td>
				<td>
					${school.mobile}
				</td>
				<td>
					${school.log}
				</td>
				<td>
					${school.code}
				</td>
				<td>
					${fns:getDictLabel(school.sftwo, 'yes_no', '')}
				</td>
				<td>
					${fns:getDictLabel(school.sfnine, 'yes_no', '')}
				</td>
				<td>
					<fmt:formatDate value="${school.updateDate}" pattern="yyyy-MM-dd HH:mm:ss"/>
				</td>
				<td>
					${school.remarks}
				</td>
				<shiro:hasPermission name="qhq:school:edit"><td>
    				<a href="${ctx}/qhq/school/form?id=${school.id}">修改</a>
					<a href="${ctx}/qhq/school/delete?id=${school.id}" onclick="return confirmx('确认要删除该学校吗？', this.href)">删除</a>
				</td></shiro:hasPermission>
			</tr>
		</c:forEach>
		</tbody>
	</table>
	<div class="pagination">${page}</div>
</body>
</html>